<template> <!-- 三方外链返回按钮 -->
  <div class="box" @click="back">
    <div class="icon"></div>
    <div class="text">
      首页
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      toJump: String
    },
    data() {
      return {}
    },
    methods: {
      back() {
        switch (this.toJump) {
          case "zxjk":
            window.location.href = 'https://saas.dzhlive.com/#/zxjk/home' 
            break;
          case "jkcgjr":
            window.location.href = 'https://saas.dzhlive.com/#/jkcgjr/home'
            break;

          default:
            break;
        }
      }
    },
    created() {},
    destroyed() {
      sessionStorage.removeItem('isJump');
      sessionStorage.removeItem('toJump');
    }
  }
</script>

<style scoped lang="less">
  .box {
    width: 100px;
    height: 100px;
    position: fixed;
    left: 10px;
    top: 60%;
    z-index: 1200;
    border-radius: 9999px;
    background-color: #fff;
    border: #f85c5c solid 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    .icon {
      width: 32px;
      height: 32px;
      background: url('../assets/images/backHomePage.png') no-repeat;
      background-size: contain;
      margin-bottom: 5px;
      margin-top: -5px;
    }

    .text {
      font-size: 0.75rem;
      color: #f85c5c;
    }
  }
</style>